import React from 'react'
import PureRenderMixin from 'react-addons-pure-render-mixin'

import ListItem from './Item/index.jsx';

import './style.less'

class ListCompoent extends React.Component {
    constructor(props, context) {
        super(props, context);
        this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
    }
    render() {
        let {ListData} = this.props;
        //console.log(ListData)
        return (
            <div className="list-container">
                {
                   ListData.map((itemdata,i)=>{
                        return <ListItem
                            {...{
                                itemdata:itemdata
                            }}
                            key={i}
                        />
                   }) 
                }
            </div>
        )
    }
}

export default ListCompoent